Documentation for Users
1.1.3
Perception Toolbox for Virtual Reality (PTVR) Manual
|
PTVR strives to use Semantic Versioning for its releases: (Major).(Minor).(Patch).
Given a version number, MAJOR.MINOR.PATCH increments the:
About creating objects imported from asset bundles using CustomObject().
In PTVR releases prior to 1.1.3, the asset bundles that were necessary to create CustomObjects could be stored on any directory of your PC (with the paths of these directories defined in your scripts).
From this version on, to simplify the handling of paths, you will have to store all your asset bundles in a directory called: "/Asset_bundles". In addition, this directory will have to be at the same level as the "\PTVR_Researchers" directory.
For instance, if you installed PTVR such that it was in the following directory: C:\Nancy\PTVR_Researchers then the directory containing ALL your asset bundles will now have to be in: C:\Nancy\Asset_bundles.
Another change is that the free asset bundles stored in https://files.inria.fr/ptvr are now organized in directories to help you retrieve easily the asset bundles you need (e.g. for a certain demo). As this directory structure is not the same as in previous PTVR versions, the current release contains a link to a zip file (Asset_bundles_for_PTVR_releases_prior_to_1_1_3.zip) containing all the asset bundles that you need if you run scripts developed with PTVR releases prior to 1.1.3. Note that you will always have access to this zip file in https://files.inria.fr/ptvr.
Another related change concerns the new 'asset_bundle_name' parameter when you import an asset bundle with CustomObject(). See the example code below:
my_character = CustomObject( asset_bundle_name = "humans_cartoons", asset_to_load = "Assets/Prefabs/Boy.prefab" )
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Unity Version : 2020.3.34f1
Documentation
Unity Version : 2020.3.34f1
my_world.idHandControllerLeft
-> -1my_world.idHandControllerRight
->-2my_world.idHeadset
-> -3my_world.idOriginCurrentCS
-> -4my_world.idGlobalCS
-> -5my_object.get_current_CS_cartesian_coordinates()
not used anymoremy_object.get_position_in_global_CS()
(not working if rotate_to_look_at or rotate_to_look_at_in_opposite_direction is used)my_object.get_axis_in_global_CS()
my_object.get_axis_tangent_screen()
my_object.get_position_on_screen_in_cartesian_coordinates_from_perimetric_coordinates(eccentricity_deg, half_meridian_deg, distance_ahead_from_screen)
my_object.reset_orientation()
my_object.reset_position()
my_object.reset()
my_object.rotate_to_look_at(id_object_to_lookAt)
my_object.rotate_to_look_at_in_opposite_direction(id_object_to_lookAt_in_opposite_direction)
tools.norm(u)
tools.scalar_product(u,v)
tools.normalize(u)
tools.vector_product(u,v)
tools.intersection_between_line_and_tangent_screen(origin, line_vector_eccentricity_deg, line_vector_half_meridian_deg,tangent_screen_origin)
tools.capoc_ray(origin, line_vector_eccentricity_deg, line_vector_half_meridian_deg)
tools.rotate_about_vector(u_vec,v_vec,theta_deg)
tools.translate_along_axis(u,axis_cs_x,axis_cs_y,axis_cs_z,epsilon)
tools.deg_to_rad(deg)
tools.rad_to_deg(rad)
tools.points_to_vec(point_a,point_b)
tools.distance_between_two_points(point_a,point_b)
tools.angle_between_two_vectors_deg(a_vec,b_vec)
tools.angle_between_two_vectors_rad(a_vec,b_vec)
tools.global_to_relative_cartesian_coordinates(point_in_global_cs,relative_cs_origin,relative_cs_axis_X,relative_cs_axis_Y,relative_cs_axis_Z)
tools.relative_to_global_cartesian_coordinates(point_in_relative_cs,relative_cs_origin,relative_cs_axis_X,relative_cs_axis_Y,relative_cs_axis_Z)
tools.segment_orientation_to_segment_projected_orientation_deg(orientation_deg, tangent_screen_X_axis,tangent_screen_Z_axis, capoc_eccentricity_deg, capoc_half_meridian_deg)
tools.segment_projected_orientation_to_segment_orientation_deg(projected_orientation_deg, tangent_screen_X_axis,tangent_screen_Z_axis, capoc_eccentricity_deg, capoc_half_meridian_deg)
tools.segment_orientation_from_local_cartesian_coordinates_deg(point_a,point_b)
tools.set_spherical_to_cartesian(eccentricity_deg, half_meridian_deg , radial_distance)
tools.set_spherical_to_cartesian_vec(eccentricity_deg, half_meridian_deg , radial_distance)
log.SetWarning(information)
log.SetError(information)
CS translations
my_world.translate_coordinate_system_along_current(translation)
my_world.translate_coordinate_system_along_global(translation)
CS rotation
my_world.rotate_coordinate_system_about_current_x(rotation_deg)
my_world.rotate_coordinate_system_about_current_y(rotation_deg)
my_world.rotate_coordinate_system_about_current_z(rotation_deg)
my_world.rotate_coordinate_system_about_global_x(rotation_deg)
my_world.rotate_coordinate_system_about_global_y(rotation_deg)
my_world.rotate_coordinate_system_about_global_z(rotation_deg)
Reset
my_world.reset_coordinate_system()
Objects translation (new functions)
my_object.set_cartesian_coordinates(x=0.0,y=0.0,z=0.0, system="leftHand_Zforward")
my_object.set_local_cartesian_coordinates(x=0.0,y=0.0,z=0.0, system="leftHand_Zforward")
my_object.set_spherical_coordinates( coordinate_system, radialDistance, eccentricity, halfMeridian, elevation, azimuth)
my_object.set_local_spherical_coordinates( coordinate_system, radialDistance, eccentricity, halfMeridian, elevation , azimuth)
my_object.set_perimetric_coordinates( radialDistance, eccentricity, halfMeridian)
my_object.set_local_perimetric_coordinates(coordinate_system, radialDistance , eccentricity, halfMeridian , elevation = OPTIONAL_VALUE, azimuth = OPTIONAL_VALUE)
my_object.translate_along_current_vector(translation = np.array([0.0,0.0,0.0]))
my_object.translate_along_current_xyz(x,y,z)
my_object.translate_along_global_vector(translation = np.array([0.0,0.0,0.0]))
my_object.translate_along_global_xyz(x,y,z)
my_object.translate_along_local_vector(translation = np.array([0.0,0.0,0.0]))
my_object.translate_along_local_xyz(x,y,z)
Objects rotation
my_object.rotate_about_global_x(angle_deg)
my_object.rotate_about_global_y(angle_deg)
my_object.rotate_about_global_z(angle_deg)
my_object.rotate_about_current_x(angle_deg)
my_object.rotate_about_current_y(angle_deg)
my_object.rotate_about_current_z(angle_deg)
my_object.rotate_about_local_x(angle_deg)
my_object.rotate_about_local_y(angle_deg)
my_object.rotate_about_local_z(angle_deg)
my_object.rotate_to_look_at(id_object_to_lookAt)
my_object.rotate_to_look_at_in_opposite_direction(id_object_to_lookAt_in_opposite_direction)
Reset
my_object.reset_position()
my_object.reset_orientation()
my_object.reset()
New Functions:
my_object..set_parent(parent,x_local, y_local, z_local)
my_object.set_spherical_coordinates_on_screen(my_tangentscreen, eccentricity_local_deg, half_meridian_local_deg, distance_ahead_from_screen ,coordinate_system="perimetric")
my_object.set_perimetric_coordinates_on_screen(my_tangentscreen, eccentricity_local_deg, half_meridian_local_deg, distance_ahead_from_screen)
my_object.set_cartesian_coordinates_on_screen(my_2D_screen, x_local, y_local, z_local)
my_scene.place(my_object,my_world)
instead of my_scene.place(my_object)Linetool
(now takes into account current_cs and parenting)position_in_current_CS
after init
not taken into account anymoreUnity Version : 2020.3.34f1